home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 October: Technology Seed / ADC Seed CD - October 1999.toast / FireWire / FireWire_2.1_SDK_DR3 / Source / SBP2 / Interfaces / SampleSBP2Priv.h < prev   
Encoding:
C/C++ Source or Header  |  1999-05-17  |  4.0 KB  |  146 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        SampleSBP2Priv.h
  3.  
  4.     Contains:    Private declarations for sample SBP-2 family
  5.  
  6.     Version:    1.0
  7.  
  8.     Copyright:    © 1998 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     File Ownership:
  11.  
  12.         DRI:                Eric Anderson
  13.  
  14.         Other Contact:        
  15.  
  16.         Technology:            FireWire
  17.  
  18.     Writers:
  19.  
  20.         (EA)    Eric Anderson (ewa)
  21.  
  22.     Change History (most recent first):
  23.  
  24.        <FW2>     9/20/98    EA        Filled in header comments.
  25.        <FW1>     9/20/98    EA        first checked in
  26. */
  27.  
  28.  
  29. #ifndef __SampleSBP2PRIV__
  30. #define __SampleSBP2PRIV__
  31.  
  32. #ifndef __TYPES__
  33. #include <Types.h>
  34. #endif
  35. #ifndef __APPLEEVENTS__
  36. #include <AppleEvents.h>
  37. #endif
  38. #ifndef __NAMEREGISTRY__
  39. #include <NameRegistry.h>
  40. #endif
  41.  
  42. #ifdef __cplusplus
  43. extern "C" {
  44. #endif
  45.  
  46. #if PRAGMA_IMPORT_SUPPORTED
  47. #pragma import on
  48. #endif
  49.  
  50. #if PRAGMA_ALIGN_SUPPORTED
  51. #pragma options align=mac68k
  52. #endif
  53.  
  54. typedef struct SBPClientDataStruct
  55.                                 SBPClientData,
  56.                                 *SBPClientDataPtr;
  57.  
  58. typedef struct SBPDriverDataStruct
  59.                                 SBPDriverData,
  60.                                 *SBPDriverDataPtr;
  61.  
  62. struct SBPFamilyDataStruct
  63. {
  64.     SBPClientDataPtr            pSBPClientList;            // Pointer to list of registered clients.
  65.     SBPDriverDataPtr            pSBPDriverList;            // Pointer to list of installed drivers.
  66.     UInt32                        numSBPDrivers;            // Number of drivers in above list.
  67. };
  68. typedef struct SBPFamilyDataStruct
  69.                                 SBPFamilyData,
  70.                                 *SBPFamilyDataPtr;
  71.  
  72. typedef struct ClientAppleEventDataStruct
  73.                                 ClientAppleEventData,
  74.                                 *ClientAppleEventDataPtr;
  75. struct ClientAppleEventDataStruct
  76. {
  77.     ClientAppleEventDataPtr        pNextClientAppleEventData;    // Link to next client Apple Event.
  78.     AppleEvent                    clientAppleEvent;        // The apple event to send.
  79.     Boolean                        clientAppleEventValid;    // True if above is valid.
  80.  
  81.     AppleEvent                    *reply;                    // Apple Event reply.
  82.     AESendMode                    sendMode;                // Send mode of Apple Event.
  83.     AESendPriority                sendPriority;            // Priority of Apple Event.//zzz how to best implement this wrt SWInts???
  84.     long                        timeOutInTicks;            // Timeout of Apple Event.//zzz how to best implement this wrt SWInts???
  85.     AEIdleUPP                    idleProc;                // Idle proc for Apple Event.
  86.     AEFilterUPP                    filterProc;                // Filter proc for Apple Event.
  87. };
  88.  
  89. struct SBPClientDataStruct
  90. {
  91.     SBPClientDataPtr            pPrevSBPClientData,
  92.                                 pNextSBPClientData;        // Pointer to previous and next client in list.
  93.  
  94.     QHdrPtr                        clientAppleEventQueue;    // Queue of Apple Events to send to client.
  95.  
  96.     AppleEvent                    deviceAddedAppleEvent;    // Apple event for device added notification.
  97.     Boolean                        deviceAddedAppleEventValid;    // True if above event is valid.
  98.  
  99.     AppleEvent                    deviceRemovedAppleEvent;    // Apple event for device removed notification.
  100.     Boolean                        deviceRemovedAppleEventValid;    // True if above event is valid.
  101.  
  102.     AEAddressDesc                clientAEAddress;        // Address of client.
  103.     Boolean                        clientAEAddressValid;    // True if above descriptor is valid.
  104.  
  105.     UInt32                        clientContextData;        // Data for use by client.
  106. };
  107.  
  108. struct SBPDriverDataStruct
  109. {
  110.     SBPDriverDataPtr            pNextSBPDriverData;        // Pointer to next driver in driver list.
  111.     SBPDriverID                    sbpDriverID;            // ID referencing this data record.
  112.     DriverRefNum                driverRefNum;            // Device Manager driver ref num.
  113.     Boolean                        driverOpened;            // True if we've opened the driver.
  114.     SBPInterfaceProcPtr            pSBPDriverInterface;    // Pointer to main interface proc
  115.                                                         // in driver.
  116.     Ptr                            pDriverSpecificData;    // Data specific to driver.
  117.     RegEntryID                    deviceRegistryID;        // Name registry ID of AV transport control device
  118.     CFragConnectionID            driverConnID;            // Code fragment connection ID for this driver.
  119.     UInt32                        numConnections;            // Number of connections to this driver.
  120.     Boolean                        deviceDisconnected;        // True if device was disconnected.
  121. };
  122.  
  123.  
  124. ////////////////////////////////////////////////////////////////////////////////
  125. //
  126. // Sample SBP family private procedures.
  127. //
  128.  
  129. OSStatus    InstallSBPExpert (void);
  130.  
  131. OSStatus    UninstallSBPExpert (void);
  132.  
  133. #if PRAGMA_ALIGN_SUPPORTED
  134. #pragma options align=reset
  135. #endif
  136.  
  137. #if PRAGMA_IMPORT_SUPPORTED
  138. #pragma import off
  139. #endif
  140.  
  141. #ifdef __cplusplus
  142. }
  143. #endif
  144.  
  145. #endif /* __SampleSBP2PRIV__ */
  146.